const a = function (echarts, d, { xe: { get, pluck } }) {
  const items = get(d, "data.items", []);
  if (!items.length) return {};
  console.log("本级补助chart data: ", items);
  return {
    tooltip: {
      trigger: "item",
      formatter: function (params) {
        return (
          params.name +
          " : " +
          params.value.toLocaleString() +
          " (" +
          params.percent +
          "%)"
        );
      },
    },
    legend: {
      orient: "vertical",
      left: "left",
      data: items.map((i) => i.name),
    },
    grid: {
      containLabel: true,
      top: 40,
      left: "10",
      right: "40",
      bottom: "10",
    },
    series: [
      {
        type: "pie",
        roseType: "radius",
        data: items.map((i) => {
          return {
            name: i.name,
            value: i.ys,
          };
        }),
      },
    ],
  };
};
